
export default class ActionHelper {


    
    static toastAction(node: cc.Node, func: Function, time: number = 1, dis: number = 200) {
        let delay = cc.delayTime(0.3);
        let moveBy = cc.moveBy(time, cc.v2(0, dis));
        let fadeOut = cc.fadeOut(time);
        let callback = cc.callFunc(func);
        node.runAction(cc.sequence(delay, cc.spawn(moveBy, fadeOut), callback));
    }

}